package net.ericaro.neojavagen.blocks ;
import net.ericaro.neojavagen.expressions.Expression;
import net.ericaro.neojavagen.blocks.StatementWithoutTrailingSubstatement;
import net.ericaro.neojavagen.blocks.Statement ;

/**
* *<pre> DoStatement :
    do Statement while ( Expression ) ;
</pre>
*/
public class DoStatement  implements StatementWithoutTrailingSubstatement {

Statement statement;
Expression expression ;

public DoStatement( Statement statement, Expression expression ){
	this.statement = statement; this.expression = expression ;
	}


public String toString(){
	StringBuilder stringbuilder = new StringBuilder();
	stringbuilder.append( "do" ).append(" ");
stringbuilder.append( this.statement ).append(" ");
stringbuilder.append( "while" ).append(" ");
stringbuilder.append( "(" ).append(" ");
stringbuilder.append( this.expression ).append(" ");
stringbuilder.append( ")" ).append(" ");
stringbuilder.append( ";\n" ).append(" ") ;
	return stringbuilder.toString();
}

}
